package com.sjp.demo.netty.rpc.consumer;

import com.sjp.demo.netty.rpc.api.IRpcHelloService;
import com.sjp.demo.netty.rpc.api.IRpcService;
import com.sjp.demo.netty.rpc.proxy.RpcProxy;

public class RpcConsumer {
    public static void main(String[] args) {
        IRpcHelloService helloService = RpcProxy.create(IRpcHelloService.class);
        System.out.println(helloService.hello("sjp"));

        IRpcService service = RpcProxy.create(IRpcService.class);
        System.out.println(service.add(8, 2));
        System.out.println(service.sub(8, 2));
    }
}
